package com.dsusoft.config;

import java.util.List;

import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
@EnableWebMvc
public class WebConfig extends WebMvcConfigurerAdapter {
    @Override
    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
        // FastJsonHttpMessageConverter fjmc = new FastJsonHttpMessageConverter();
        //
        // List<MediaType> subMediaTypes = new ArrayList<MediaType>();
        // subMediaTypes.add(MediaType.ALL);
        // fjmc.setSupportedMediaTypes(subMediaTypes);
        //
        // SerializerFeature[] features = {SerializerFeature.WriteMapNullValue,
        // SerializerFeature.WriteDateUseDateFormat, SerializerFeature.WriteNullStringAsEmpty,
        // SerializerFeature.WriteSlashAsSpecial};
        // fjmc.setFeatures(features);
        //
        // converters.add(fjmc);
    }
}
